package com.boarsoft.boar.entity;

public class ComInfo {
	public static final short STATUS_NOUSE = 0;
	public static final short STATUS_INUSE = 1;

	/** 子流程 */
	public static final String TYPE_SUBFLOW = "subflow";
	/** 处理节点 */
	public static final String TYPE_PROCESS = "process";
	/** 判定节点 */
	public static final String TYPE_JUDGE = "judge";
	/** 输入节点 */
	public static final String TYPE_INPUT = "input";
	/** 输出节点 */
	public static final String TYPE_OUTPUT = "output";
	/** 多路分支节点 */
	public static final String TYPE_SWITCH = "switch";

	/** 组件ID */
	private String id;
	/** 组件编号 */
	private String code;
	/** 组件名称 */
	private String name;
	/** 接口ID */
	private String faceId;
	/** 实现类 */
	private String impl;
	/** 实现类的版本 */
	private String ver;
	/** 状态 */
	private short status = STATUS_INUSE;
	/** 组件类型 */
	private String type = TYPE_PROCESS;
	/** 图表信息JSON */
	private String json;
	/** 组件描述 */
	private String memo;

	/** 引用接口 */
	private FaceInfo face;

	@Override
	public boolean equals(Object o) {
		if (id != null && o != null && o instanceof ComInfo) {
			return id.equals(((ComInfo) o).getId());
		}
		return false;
	}

	public ComInfo() {
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = (memo == null ? "" : memo);
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getFaceId() {
		return faceId;
	}

	public void setFaceId(String faceId) {
		this.faceId = faceId;
	}

	public String getVer() {
		return ver;
	}

	public void setVer(String ver) {
		this.ver = (ver == null ? "" : ver);
	}

	public String getImpl() {
		return impl;
	}

	public void setImpl(String impl) {
		this.impl = impl;
	}

	public String getJson() {
		return json;
	}

	public void setJson(String json) {
		this.json = json;
	}

	public short getStatus() {
		return status;
	}

	public void setStatus(short status) {
		this.status = status;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public FaceInfo getFace() {
		return face;
	}

	public void setFace(FaceInfo face) {
		this.face = face;
	}
}